#
# FORMAT: tag enum, value representation (VR), value multiplicity (VM), default value
# VR: ST for text, US for unsigned, SI for signed, FP for floating point, GR for group,
#     EN for group end, BO for boolean
# VM: Must be no longer than the size given here; set to 00 for repeating groups
# default value cannot be set for VM > 1, ST, GR or EN
#
01 ST 01 - 		# Format identifier: "WZTAGFILE1"
03 GR 01 -		# MAP INFO GROUP
  01 US 01 64		# Map width
  02 US 01 64		# Map height
  FF EN 00 -
04 GR 01 -		# CAMERA INFO GROUP
  01 FP 03 -		# Camera position
  02 FP 03 -		# Camera rotation
  FF EN 00 -
05 GR 00 -		# TEXTURE GROUP
  01 ST 80 -		# Texture name
  FF EN 00 -
0a GR 00 -		# TILE GROUP
  01 US 01 0		# Terrain type
  02 US 01 0		# Texture number
  03 US 01 0		# Triangle flip
  04 US 01 0		# Texture x flip
  05 US 01 0		# Texture y flip
  06 US 01 0		# Not blocking (even if structure or feature on it)
  07 US 01 0		# *RETIRED* Do not draw flag
  08 US 01 0		# Height of first corner
  09 US 01 0		# Visibility bits
  0a US 01 0		# Info bits
  0b US 01 0		# Rotation
  FF EN 00 -
0b GR 00 -		# GATEWAY GROUP
  01 US 04 -		# (x1, y1, x2, y2) coordinates
  FF EN 00 -
0c GR 00 -		# TEXTURE <=> TERRAIN TYPE MAPPING GROUP
  01 US 01 0		# The terrain type of this texture
  FF EN 00 -
0d GR 00 -		# PLAYER INFO GROUP
  01 GR 00 -		# RESEARCH GROUP
    01 US 01 1		# Is research possible of this tech?
    02 US 01 0		# Research status
    03 US 01 0		# Current research points
    FF EN 00 -
  02 GR 00 -		# STRUCTURE LIMITS GROUP
    01 ST 80 -		# Name of structure
    02 US 01 255	# Limit
    FF EN 00 -
  03 GR 00 -		# FLAGS GROUP
    01 US 01 -		# Type
    02 US 01 0		# Frame number last drawn
    03 US 03 -		# Screen coordinates and radius (x, y, r)
    04 US 04 -		# Player that the position belongs to
    05 BO 05 0		# Is position selected by the player?
    06 US 03 -		# World coordinates (x, y, z)
    07 US 01 0		# Factory index
    08 US 01 0		# Factory type
    09 US 01 -		# Repair ID - only set if factory type is REPAIR_FLAG
    0a BO 01 0		# Do not register flag in flag list (commanders)
    FF EN 00 -
  04 GR 00 -		# MESSAGE GROUP
    01 SI 01 -1		# Object ID, if set, use it rather than name below; -1 means unset
    02 ST 80 -		# Name
    03 BO 01 0		# Is message read?
    FF EN 00 -
  FF EN 00 -
0e GR 00 -		# PRODUCTION RUNS GROUP (factory types)
  01 GR 00 -		# Number of factories
    01 GR 00 -		# Production runs for each factory
      01 US 01 0	# Quantity
      02 US 01 0	# Built
      03 SI 01 -1	# Template multiplayerID, -1 if none
      FF EN 00 -
    FF EN 00 -
  FF EN 00 -
0f GR 00 -		# OBJECT GROUP
  01 GR 00 -		# BASE OBJECT GROUP
    01 US 01 -		# Object type (always type droid)
    02 US 01 -		# Unique object id
    03 US 03 -		# (x, y, z) position coordinates
    04 FP 01 -		# Direction
    05 SI 01 -		# Pitch
    06 SI 01 -		# Roll
    07 US 01 -		# Player
    08 US 01 -		# Selection group
    09 US 01 -		# Selected
    0a US 01 -		# Cluster
    0b US 08 -		# Visibility per player
    0c US 01 -		# Died (in game time)
    0d US 01 -		# Last smoke emission (in game time)
    0e BO 01 -		# On fire?
    0f US 01 -		# Burn start (in game time)
    10 US 01 -		# Total accumulated burn damage
    FF EN 00 -
  02 GR 00 -		# SENSOR GROUP
    01 US 01 0		# Sensor range
    02 US 01 0		# Sensor power
    03 US 01 0		# ECM range
    04 US 01 0		# ECM power
    FF EN 00 -
  03 GR 00 -		# OBJECT STAT GROUP
    01 US 01 -		# Original body points
    02 US 01 2		# Number of weapon classes
    03 GR 00 -		# ARMOUR GROUP (for each defined side)
      01 US 01 0	# Armour vs kinetic weapons
      02 US 02 0	# Armour vs heat weapons
      FF EN 00 -
    04 US 01 -		# Resistance (used in electronic warfare)
    FF EN 00 -
  04 GR 00 -		# WEAPON GROUP
    01 US 01 -		# Weapon type
    02 US 01 0		# Weapon rotation
    03 US 01 0		# Weapon pitch
    04 US 01 0		# hitPoints (EXPLAIN ME)
    05 US 01 0		# Ammo
    06 US 01 0		# Time frame it was last fired
    07 US 01 0		# recoilValue (EXPLAIN ME)
    08 SI 01 -1		# ID of weapon target, -1 if none
    FF EN 00 -
  0a GR 00 -		# DROID GROUP
    01 US 01 -		# Droid type
    02 US 0a -		# Components
    03 BO 01 0		# Transport on mission?
    07 US 01 -		# Weight
    08 US 01 -		# Base speed
    09 ST 60 -		# Droid name (typically template name)
    0a US 01 -		# Current body points
    0b FP 01 -		# Experience
    0c US 01 -		# Name version (EXPLAIN ME)
    0e SI 01 -1		# Current job target ID (repairing stuff etc)
    0f SI 01 -1		# Current stats target ID (building stuff etc)
    10 SI 01 -1		# Current base target ID (rearm pad etc)
    11 US 01 0		# Current order
    12 US 04 -		# Current order parameters
    13 GR 00 -		# DROID ORDER GROUP (queued orders)
      01 US 01 -	# Order
      02 US 04 -	# Order parameters
      FF EN 00 -
    14 SI 01 0		# Formation direction
    15 SI 01 0		# Formation X
    16 SI 01 0		# Formation Y
    17 US 03 -		# VTOL ammo (for each weapon)
    18 SI 02 -		# Droid movement final destination (x, y)
    19 SI 02 -		# Droid movement origin (x, y)
    1a SI 02 -		# Droid movement immediate target (x, y)
    1b FP 03 -		# Fractions of x,y,z
    1c FP 01 -		# Droid speed
    1d SI 02 -		# Vector for the end of path boundary (x, y)
    1e US 02 -		# Position of last bump (x, y)
    1f SI 01 -		# Direction of motion (not the direction the droid is facing)
    20 SI 01 -		# Direction at last bump
    21 US 01 -		# Time of first bump with something
    22 US 01 -		# Time of last bump with a droid - relative to bumpTime
    23 US 01 -		# When MOVEPAUSE started - relative to bumpTime
    24 US 01 -		# VTOL movement speed
    25 GR 00 -		# PATH GROUP (each item is a position in a path)
      01 US 01 -	# (x, y) position node
      FF EN 00 -
    26 US 01 0		# Path status
    27 US 01 0		# Current position in path
    FF EN 00 -
  0b GR 00 -		# STRUCTURE GROUP (EXPLAIN ME)
    01 US 01 -		# Structure type
    02 SI 01 0		# currentPowerAccrued
    03 US 01 0		# lastResistance
    04 US 01 0		# targetted
    05 US 01 0		# timeLastHit
    06 US 01 0		# lastHitWeapon
    07 US 01 1		# status (0 = being built, 1 = built, 2 = being demolished)
    08 SI 01 0		# currentBuildPts
    FF EN 00 -
  0c GR 00 -		# FEATURE GROUP
    01 US 01 0		# Time frame it was created
    FF EN 00 -
  0d GR 00 -		# FACTORY GROUP
    01 US 01 0		# Capacity (the max size of body the factory can produce)
    02 US 01 0		# Quantity (the number of droids to produce OR for selectedPlayer, how many loops to perform)
    03 US 01 0		# Loops performed
    04 US 01 0		# Production output (droid build points produced per build cycle)
    05 US 01 0		# powerAccrued (used to keep track of power before building a droid)
    06 SI 01 -1		# ID of template used, -1 for none
    07 US 01 0		# timeStarted
    08 US 01 0		# timeToBuild
    09 US 01 0		# timeStartHold
    0a US 01 0		# secondaryOrder
    0b SI 01 -1		# Factory number, also used to find right flag after game load, oddly enough; -1 for none
    0c SI 01 -1		# Commander ID, if any, -1 if none
    FF EN 00 -
  0e GR 00 -		# RESEARCH GROUP
    01 US 01 0		# Number of upgrades it has
    02 US 01 0		# powerAccrued
    03 US 01 0		# timeStartHold
    04 US 01 0		# ID of research target
    05 US 01 0		# Time frame research started
    FF EN 00 -
  0f GR 00 -		# RESOURCE EXTRACTOR GROUP
    01 US 01 0		# Maximum amount of power that can be extracted from this resource
    02 SI 01 -1		# ID of power plant that owns this resource, if any, -1 if none
    FF EN 00 -
  10 GR 00 -		# POWER PLANT GROUP
    01 US 01 0		# Number of upgrades it has
    FF EN 00 -
  11 GR 00 -		# REPAIR FACILITY GROUP
    01 US 01 0		# timeStarted
    02 US 01 0		# powerAccrued
    03 SI 01 -1		# Object being repaired, if any, -1 if none
    04 SI 01 -1		# Research facility number, also used to find right flag after game load, -1 for none
    FF EN 00 -
  12 GR 00 -		# REARM PAD GROUP
    01 US 01 0		# reArmPoints
    02 US 01 0		# timeStarted
    03 US 01 0		# currentPtsAdded
    04 SI 01 -1		# Object being rearmed, if any, -1 if none
    FF EN 00 -
  FF EN 00 -
10 GR 00 -		# GATEWAY ZONE LINES
  01 US 01 0		# Size of binary blob.
  02 US 01 -		# Ugly binary blob of data. Someone please decode me!
  FF EN 00 -
11 GR 00 -		# GATEWAY EQUIVALENCY ZONES
  01 US 01 0		# Size of binary blob.
  02 US 01 -		# Ugly binary blob of data. Someone please decode me!
  FF EN 00 -
